<template>
  <div class="mt-list-operate">
    <div v-if="show" class="total">
      共计{{ total }}条数据， 已选{{ totalSelected }}条
    </div>
    <slot></slot>
  </div>
</template>

<script>
export default {
  name: "mtListOperate",

  props: {
    total: {
      type: Number,
      default: 0
    },
    totalSelected: {
      type: Number,
      default: 0
    },
    show: {
      type: Boolean,
      default: true
    }
  },

  data() {
    return {};
  },

  computed: {
    btnDisabled() {
      return !this.totalSelected ? true : false;
    }
  },

  watch: {},

  created() {},

  mounted() {},

  methods: {
    // 批量删除
    deleteSelected() {
      this.$emit("deleteSelected");
    }
  }
};
</script>

<style lang="scss" scoped>
.mt-list-operate {
  left: 40px;
  display: flex;
  .total {
    height: 40px;
    line-height: 30px;
    color: $gray;
    font-size: $fontsize__small;
    margin-right: 20px;
  }
}
</style>
